package com.hissy.common.design.create.factory;

/**
 * Created by zhangyanfei on 2019/4/3.
 * 工厂方法
 *
 * @author zhangyanfei
 * @date 2019/04/03
 */
public class FactoryB implements FactoryMethod {
    private PersonB personB;

    FactoryB() {
        personB = new PersonB();
    }

    @Override
    public AbstractPerson createPerson() {
        return personB;
    }

    @Override
    public void doSomething() {
        personB.doSomething();
    }
}
